<?php
/**
 * KumbiaPHP web & app Framework
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://wiki.kumbiaphp.com/Licencia
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@kumbiaphp.com so we can send you a copy immediately.
 *
 * Paginador "simple" para aplicaciones
 *
 * Parametros del paginador:
 *   page: objeto obtenido al invocar al paginador
 *   url: url para la accion que efectua la paginacion, por defecto "module/controller/page/"
 *        y se envia por parametro el numero de pagina
 * 
 * @category   Kumbia
 * @package    Partials 
 * @copyright  Copyright (c) 2005-2009 Kumbia Team (http://www.kumbiaphp.com)
 * @license    http://wiki.kumbiaphp.com/Licencia     New BSD License
 */
 
if(!isset($url)) {
    extract(Router::get());
    $url = "$controller/page";
    if($module) {
        $url = "$module/$url";
    }
}
 
?>

<div class="paginator">
    <?php if($page->prev) echo link_to("$url/$page->prev/", 'Anterior') ?>

    pag. <?php echo $page->current ?>/<?php echo $page->total ?>

    <?php if($page->next) echo link_to("$url/$page->next/", 'Siguiente') ?>
</div>